﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ERPStudio;
using System.Data.SqlClient;

namespace ExBug
{
    public partial class ResponsabilVizaCFPFrm : FrmRezumat
    {
        public ResponsabilVizaCFPFrm(ModuleClass mInfo)
            : base(mInfo)
        {
            InitializeComponent();
            workConnString = mInfo.workConnectionString;
            eSRPDataSet.ResponsabilVizaCFP.CodUnitateColumn.DefaultValue = ModuleInfo.CodUnitate;
        }

        private void ResponsabilVizaCFPFrm_Load(object sender, EventArgs e)
        {
            SqlConnection con = DeschideConexiune(workConnString);
            this.exBugViewPersoaneTableAdapter.Connection = con;
            this.exBugViewPersoaneTableAdapter.Fill(this.eSRPDataSet.ExBugViewPersoane);
            this.responsabilVizaCFPTableAdapter.Connection = con;
            this.responsabilVizaCFPTableAdapter.Fill(this.eSRPDataSet.ResponsabilVizaCFP, ModuleInfo.CodUnitate);
            InchideConexiune(con);
            this.listBndSourceMain.Add(responsabilVizaCFPBindingSource);
            this.listTableAdaptor.Add(responsabilVizaCFPTableAdapter.Adapter);

            AddButton("Salvare", global::ExBug.Properties.Resources.salvare, Salvare, ToolStripItemAlignment.Right, true);
            HandleSalvare += Salvare;


        }
    }
}
